package com.yazi.mxz.common.db.dao.impl;


import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.yazi.mxz.common.db.dao.SettingDao;
import com.yazi.mxz.common.entity.beans.Setting;
import com.myframework.smhj.hibernate.Searching;
import com.myframework.smhj.hibernate.Sort;
import com.myframework.smhj.hibernate.Sorting;
import com.myframework.smhj.hibernate.dao.BasicDao;

@Repository("settingDao")
public class SettingDaoImpl extends BasicDao<Setting> implements SettingDao {

	
	public SettingDaoImpl() {
		super(Setting.class);
		
	}
	
	@Override
	public List<Setting> listAll() {
		List<Sort> sorts = new ArrayList<Sort>();
		sorts.add(new Sort("settingId"));
		Sorting sorting = new Searching();
		sorting.setSorts(sorts);
		return listByExample(null, sorting);
	}
	
}
